Program equivalence in linear contexts
نویسندگان
چکیده
Program equivalence in linear contexts, where programs are used or executed exactly once, is an important issue in programming languages. However, existing techniques like those based on bisimulations and logical relations only target at contextual equivalence in the usual (non-linear) functional languages, and fail in capturing non-trivial equivalent programs in linear contexts, particularly when non-determinism is present. We propose the notion of linear contextual equivalence to formally characterize such program equivalence, as well as a novel and general approach to studying it in higher-order languages, based on labeled transition systems specifically designed for functional languages. We show that linear contextual equivalence indeed coincides with trace equivalence. We illustrate our technique in both deterministic (a linear version of PCF) and non-deterministic (linear PCF in Moggi’s framework) functional languages.
منابع مشابه
On Coinduction and Quantum Lambda Calculi
In the ubiquitous presence of linear resources in quantum computation, program equivalence in linear contexts, where programs are used or executed once, is more important than in the classical setting. We introduce a linear contextual equivalence and two notions of bisimilarity, a state-based and a distribution-based, as proof techniques for reasoning about higher-order quantum programs. Both n...
متن کاملCompleteness of Bisimilarity for Contextual Equivalence in Linear Theories
In this paper, we develop new variations of methods from operational semantics, and show how to apply these to a linear type theory which has a lazy operational semantics. In particular, we consider how one can establish contextual equivalences in a linear theory with function types and tensor types by instead establishing bisimulations. Thus bisimilarity is sound for contextual equivalence. Fu...
متن کاملA Language-Independent Proof System for Mutual Program Equivalence
Two programs or fragments of program are mutually equivalent i↵ either they both diverge or they end up in similar states. Mutual equivalence is desirable in many contexts, ranging from capturing program equivalence or correctness of program transformations within the same language, to capturing correctness of compilers from one language to another. This paper introduces a language-independent ...
متن کاملContextual Equivalence for the Pi-Calculus that can Stop
The pi-calculus is a well-analyzed model for mobile processes and mobile computations. While a lot of other process and lambda calculi that are core languages of higher-order concurrent and/or functional programming languages use a contextual semantics observing the termination behavior of programs in all program contexts, traditional program equivalences in the pi-calculus are bisimulations an...
متن کاملReasoning about Contextual Equivalence: From Untyped to Polymorphically Typed Calculi
This paper describes a syntactical method for contextual equivalence in polymorphically typed lambda-calculi. Our specific calculus has letrec as cyclic let, data constructors, case-expressions, seq, and recursive types. The typed language is a subset of the untyped language. Normal-order reduction is defined for the untyped language. Since there are less typed contexts the typed contextual pre...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Theor. Comput. Sci.
دوره 585 شماره
صفحات -
تاریخ انتشار 2015